package demo1;

import java.util.Comparator;

public class AgeCompare implements Comparator<Person>{
    @Override
    public int compare(Person o1, Person o2) {
        return o1.age - o2.age;
    }
    /*@Override
    public int compare(Person o1, Person o2) {
        return 0;
    }*/
    /*@Override
    public int compare(Object o1, Object o2) {
        return o1.age
    }*/
}
